//
//  DFProductsProductDetailModel.m
//  cf
//
//  Created by lanou on 15/10/25.
//  Copyright © 2015年 xuzenghui. All rights reserved.
//

#import "DFProductsProductDetailModel.h"

@implementation DFProductsProductDetailModel

- (instancetype)init
{
    if (self = [super init]) {
        _proInfo = [[DFProductsProductProInfo alloc]init];
        _sortParamArr = [NSMutableArray array];
    }
    return self;
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    
    if ([key isEqualToString:@"sortParam"]) {
        if ([[value class] isSubclassOfClass:[NSMutableArray class]]) {
             for (NSDictionary *dic in value) {
            _sortParam = [[DFProductsProductsortParam alloc]init];
            [_sortParam setValuesForKeysWithDictionary:dic];
            [_sortParamArr addObject:_sortParam];
        }
        }
           }
    else{
    if ([key isEqualToString:@"proInfo"]) {
        [_proInfo setValuesForKeysWithDictionary:value];
    }else
    {
        [super setValue:value forKey:key];
    }
    }
}



@end
